/**
 *
 */
package gemini.castor.ui.client;

import gemini.castor.ui.client.service.AccountService;
import gemini.castor.ui.client.service.AccountServiceAsync;
import gemini.castor.ui.client.service.BillService;
import gemini.castor.ui.client.service.BillServiceAsync;
import gemini.castor.ui.client.service.CheckCaptchaService;
import gemini.castor.ui.client.service.CheckCaptchaServiceAsync;
import gemini.castor.ui.client.service.CustomerService;
import gemini.castor.ui.client.service.CustomerServiceAsync;
import gemini.castor.ui.client.service.DistributorService;
import gemini.castor.ui.client.service.DistributorServiceAsync;
import gemini.castor.ui.client.service.DownlineService;
import gemini.castor.ui.client.service.DownlineServiceAsync;
import gemini.castor.ui.client.service.EventService;
import gemini.castor.ui.client.service.EventServiceAsync;
import gemini.castor.ui.client.service.MonthlyPointService;
import gemini.castor.ui.client.service.MonthlyPointServiceAsync;
import gemini.castor.ui.client.service.PersonService;
import gemini.castor.ui.client.service.PersonServiceAsync;
import gemini.castor.ui.client.service.ProductService;
import gemini.castor.ui.client.service.ProductServiceAsync;
import gemini.castor.ui.client.service.ProductTypeByCodeService;
import gemini.castor.ui.client.service.ProductTypeByCodeServiceAsync;
import gemini.castor.ui.client.service.ProductTypeService;
import gemini.castor.ui.client.service.ProductTypeServiceAsync;
import gemini.castor.ui.client.service.SearchProductService;
import gemini.castor.ui.client.service.SearchProductServiceAsync;
import gemini.castor.ui.client.service.ShoppingService;
import gemini.castor.ui.client.service.ShoppingServiceAsync;
import gemini.castor.ui.client.service.SponsorService;
import gemini.castor.ui.client.service.SponsorServiceAsync;
import gemini.castor.ui.client.service.UserService;
import gemini.castor.ui.client.service.UserServiceAsync;

import com.google.gwt.core.client.GWT;

/**
 * The class define accessor methods to get RPC services.
 *
 */
public final class ServiceCatalog {

    private ServiceCatalog() {
    }

    private static UserServiceAsync userService;

    public static final UserServiceAsync getUserService() {
        if (userService == null) {
        	userService = GWT.create(UserService.class);
        }
        return userService;
    }
    
    private static PersonServiceAsync personService;

    public static final PersonServiceAsync getPersonService() {
        if (personService == null) {
        	personService = GWT.create(PersonService.class);
        }
        return personService;
    }
    
    private static AccountServiceAsync accountService;
    
    public static final AccountServiceAsync getAccountService() {
    	if (accountService == null) {
    		accountService = GWT.create(AccountService.class);
    	}
    	return accountService;
    }
    
    private static DistributorServiceAsync distributorService;

    public static final DistributorServiceAsync getDistributorService() {
        if (distributorService == null) {
        	distributorService = GWT.create(DistributorService.class);
        }
        return distributorService;
    }
    
    private static DownlineServiceAsync downlineService;
    
    public static final DownlineServiceAsync getDownlineService() {
    	if (downlineService == null) {
    		downlineService = GWT.create(DownlineService.class);
    	}
    	return downlineService;
    }
    
    private static BillServiceAsync billService;
    
    public static final BillServiceAsync getBillService() {
    	if (billService == null) {
    		billService = GWT.create(BillService.class);
    	}
    	return billService;
    }
    
    private static SponsorServiceAsync sponsorService;
    
    public static final SponsorServiceAsync getSponsorService() {
    	if (sponsorService == null) {
    		sponsorService = GWT.create(SponsorService.class);
    	}
    	return sponsorService;
    }
    
    private static ProductServiceAsync productService;

    public static final ProductServiceAsync getProductService() {
        if (productService == null) {
        	productService = GWT.create(ProductService.class);
        }
        return productService;
    }
    
    private static SearchProductServiceAsync searchProductService;
    
    public static final SearchProductServiceAsync getSearchProductService() {
    	if (searchProductService == null) {
    		searchProductService = GWT.create(SearchProductService.class);
    	}
    	return searchProductService;
    }
    
    private static ProductTypeServiceAsync productTypeService;
    
    public static final ProductTypeServiceAsync getProductTypeService() {
    	if (productTypeService == null) {
    		productTypeService = GWT.create(ProductTypeService.class);
    	}
    	return productTypeService;
    }
    
    private static ProductTypeByCodeServiceAsync productTypeByCodeService;
    
    public static final ProductTypeByCodeServiceAsync getProductTypeByCodeService() {
    	if (productTypeByCodeService == null) {
    		productTypeByCodeService = GWT.create(ProductTypeByCodeService.class);
    	}
    	return productTypeByCodeService;
    }
    
    private static ShoppingServiceAsync shoppingService;

    public static final ShoppingServiceAsync getShoppingService() {
        if (shoppingService == null) {
        	shoppingService = GWT.create(ShoppingService.class);
        }
        return shoppingService;
    }
    
    private static CheckCaptchaServiceAsync checkCaptchaService;

    public static final CheckCaptchaServiceAsync getCheckCaptchaService() {
        if (checkCaptchaService == null) {
        	checkCaptchaService = GWT.create(CheckCaptchaService.class);
        }
        return checkCaptchaService;
    }

    private static EventServiceAsync eventService;
	public static EventServiceAsync getEventService() {
		   if (eventService == null) {
			   eventService = GWT.create(EventService.class);
	        }
	        return eventService;
	}
	
	private static CustomerServiceAsync customerService;
	public static CustomerServiceAsync getCustomerService() {
		if (customerService == null) {
			customerService = GWT.create(CustomerService.class);
		}
		return customerService;
	}
	
	 private static MonthlyPointServiceAsync monthlyPointService;
	public static MonthlyPointServiceAsync getMonthlyPointService() {
		if (monthlyPointService == null) {
			monthlyPointService = GWT.create(MonthlyPointService.class);
		}
		return monthlyPointService;
	}
}
